/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package tolls;

/**
 *
 * @author Aggelos
 */
public class CollectTollForm extends javax.swing.JFrame {

    /**
     * Creates new form CollectTollForm
     */
    public CollectTollForm() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        Ari8mosKukloforias = new javax.swing.JTextField();
        Ari8mosKartas = new javax.swing.JTextField();
        ArKartas = new javax.swing.JLabel();
        YpoloipoKartas = new javax.swing.JLabel();
        YpolKartas = new javax.swing.JTextField();
        Shma = new javax.swing.JLayeredPane();
        Shma1 = new javax.swing.JLabel();
        Shma2 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        Plaisio = new javax.swing.JPanel();
        Dieleush = new javax.swing.JButton();
        Plhrwmh = new javax.swing.JButton();
        ArKukloforias = new javax.swing.JLabel();
        DiaxwristikhGrammh = new javax.swing.JSeparator();
        DiaxwristikhGrammh1 = new javax.swing.JSeparator();
        Titlos = new javax.swing.JLabel();
        Plaisio1 = new javax.swing.JPanel();
        Akyro = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setBackground(java.awt.Color.gray);
        setMinimumSize(new java.awt.Dimension(505, 480));
        setPreferredSize(new java.awt.Dimension(505, 515));
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        Ari8mosKukloforias.setForeground(new java.awt.Color(153, 0, 0));
        Ari8mosKukloforias.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Ari8mosKukloforiasActionPerformed(evt);
            }
        });
        getContentPane().add(Ari8mosKukloforias, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 200, 100, -1));
        getContentPane().add(Ari8mosKartas, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 250, 100, -1));

        ArKartas.setFont(new java.awt.Font("Lucida Sans", 0, 12)); // NOI18N
        ArKartas.setForeground(new java.awt.Color(102, 0, 153));
        ArKartas.setText("Αρ. Κάρτας: ");
        getContentPane().add(ArKartas, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 250, -1, -1));

        YpoloipoKartas.setFont(new java.awt.Font("Lucida Sans", 0, 12)); // NOI18N
        YpoloipoKartas.setForeground(new java.awt.Color(102, 0, 153));
        YpoloipoKartas.setText("Υπόλοιπο Κάρτας: ");
        getContentPane().add(YpoloipoKartas, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 310, -1, -1));

        YpolKartas.setEditable(false);
        YpolKartas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                YpolKartasActionPerformed(evt);
            }
        });
        getContentPane().add(YpolKartas, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 310, 100, -1));

        Shma.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(153, 0, 0), null));
        Shma.setToolTipText("");

        Shma1.setFont(new java.awt.Font("Verdana", 0, 36)); // NOI18N
        Shma1.setForeground(new java.awt.Color(102, 0, 153));
        Shma1.setText("Tele-Pass");
        Shma1.setBounds(190, 30, 180, 40);
        Shma.add(Shma1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        Shma2.setFont(new java.awt.Font("Lucida Sans", 0, 14)); // NOI18N
        Shma2.setForeground(new java.awt.Color(102, 0, 153));
        Shma2.setText("Automatic Toll Collection System");
        Shma2.setBounds(190, 70, 230, 30);
        Shma.add(Shma2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel5.setFont(new java.awt.Font("Bradley Hand ITC", 0, 10)); // NOI18N
        jLabel5.setForeground(new java.awt.Color(102, 0, 153));
        jLabel5.setText("Developed by ANDIMAGI workgroup");
        jLabel5.setBounds(310, 0, 180, 20);
        Shma.add(jLabel5, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/toll_image1.jpg"))); // NOI18N
        jLabel4.setToolTipText("");
        jLabel4.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jLabel4.setBounds(0, 0, 180, 100);
        Shma.add(jLabel4, javax.swing.JLayeredPane.DEFAULT_LAYER);

        getContentPane().add(Shma, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 490, 100));

        Plaisio.setBackground(new java.awt.Color(255, 102, 102));

        Dieleush.setFont(new java.awt.Font("Lucida Sans", 0, 12)); // NOI18N
        Dieleush.setForeground(new java.awt.Color(102, 0, 153));
        Dieleush.setText("ΔΙΕΛΕΥΣΗ");
        Dieleush.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DieleushActionPerformed(evt);
            }
        });
        Plaisio.add(Dieleush);

        Plhrwmh.setFont(new java.awt.Font("Lucida Sans", 0, 12)); // NOI18N
        Plhrwmh.setForeground(new java.awt.Color(102, 0, 153));
        Plhrwmh.setText("ΠΛΗΡΩΜΗ");
        Plaisio.add(Plhrwmh);

        getContentPane().add(Plaisio, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 190, 120, 240));

        ArKukloforias.setFont(new java.awt.Font("Lucida Sans", 0, 12)); // NOI18N
        ArKukloforias.setForeground(new java.awt.Color(102, 0, 153));
        ArKukloforias.setText("Αρ. Κυκλοφορίας: ");
        getContentPane().add(ArKukloforias, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 180, 110, 60));

        DiaxwristikhGrammh.setForeground(new java.awt.Color(102, 0, 153));
        getContentPane().add(DiaxwristikhGrammh, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 290, 230, 30));

        DiaxwristikhGrammh1.setForeground(new java.awt.Color(102, 0, 153));
        getContentPane().add(DiaxwristikhGrammh1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 170, 450, 30));

        Titlos.setFont(new java.awt.Font("Lucida Sans", 1, 18)); // NOI18N
        Titlos.setForeground(new java.awt.Color(102, 0, 153));
        Titlos.setText("Διέλευση Οχήματος");
        getContentPane().add(Titlos, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 120, -1, -1));

        Plaisio1.setBackground(new java.awt.Color(255, 102, 102));
        Plaisio1.setForeground(new java.awt.Color(255, 102, 102));

        Akyro.setFont(new java.awt.Font("Lucida Sans", 0, 12)); // NOI18N
        Akyro.setForeground(new java.awt.Color(102, 0, 153));
        Akyro.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/cancel.gif"))); // NOI18N
        Akyro.setText("ΑΚΥΡΟ");
        Akyro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                AkyroActionPerformed(evt);
            }
        });
        Plaisio1.add(Akyro);

        getContentPane().add(Plaisio1, new org.netbeans.lib.awtextra.AbsoluteConstraints(340, 430, 120, 40));

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void Ari8mosKukloforiasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Ari8mosKukloforiasActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_Ari8mosKukloforiasActionPerformed

    private void YpolKartasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_YpolKartasActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_YpolKartasActionPerformed

    private void DieleushActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DieleushActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_DieleushActionPerformed

    private void AkyroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AkyroActionPerformed
        // TODO add your handling code here:
        em.getTransaction().rollback();
        em.getTransaction().begin();
        dispose();
    }//GEN-LAST:event_AkyroActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(CollectTollForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(CollectTollForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(CollectTollForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(CollectTollForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new CollectTollForm().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton Akyro;
    private javax.swing.JLabel ArKartas;
    private javax.swing.JLabel ArKukloforias;
    private javax.swing.JTextField Ari8mosKartas;
    private javax.swing.JTextField Ari8mosKukloforias;
    private javax.swing.JSeparator DiaxwristikhGrammh;
    private javax.swing.JSeparator DiaxwristikhGrammh1;
    private javax.swing.JButton Dieleush;
    private javax.swing.JPanel Plaisio;
    private javax.swing.JPanel Plaisio1;
    private javax.swing.JButton Plhrwmh;
    private javax.swing.JLayeredPane Shma;
    private javax.swing.JLabel Shma1;
    private javax.swing.JLabel Shma2;
    private javax.swing.JLabel Titlos;
    private javax.swing.JTextField YpolKartas;
    private javax.swing.JLabel YpoloipoKartas;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    // End of variables declaration//GEN-END:variables
}
